﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/masDefault.master" AutoEventWireup="true"
    CodeFile="UserDetail.aspx.cs" Inherits="WebTeamplate.Admin_UserDetail" %>

<%@ Import Namespace="WebTeamplate" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ctMain" runat="Server">
    <link href="../include/calendar/calendar-win2k-cold-1.css" rel="stylesheet" type="text/css" />

    <script src="../Js/DateFunction.js"></script>

    <script type="text/javascript" src="../include/calendar/calendar.js"></script>

    <script type="text/javascript" src="../include/calendar/calendar-setup.js" language="javascript"></script>

    <script type="text/javascript" src="../include/calendar/lang/calendar-en.js"></script>

    <script type="text/javascript" src="../include/calendar/lang/calendar-en.js"></script>

    <div class="ui-state-default ui-corner-top ui-box-header">
        <span class="ui-icon float-left ui-icon-notice"></span>(<span class="commentRequireInput">*</span>):
        <%=Resources.Resource.CommentRequire %>
    </div>
    <div class="content-box-wrapper">
        <br />
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td>
                </td>
                <td colspan="2" class="dvtCellErrorMessage">
                    <asp:ValidationSummary ID="vsumSumary" CssClass="validateSumary" DisplayMode="BulletList"
                        runat="server" ShowMessageBox="true" ShowSummary="false" />
                    <asp:Label ID="lblErrorMessage" Text="" runat="server" CssClass="validateSumary"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 170px;" class="labelRight">
                    <asp:Label ID="lblName" runat="server" Text="Họ tên"></asp:Label>(<span class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:TextBox ID="txtName" runat="server" Width="150px" MaxLength="50" CssClass="txt adminControl"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="refvName" ControlToValidate="txtName" runat="server"
                        SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblUserName" runat="server" Text="Tên đăng nhập"></asp:Label>(<span
                        class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:TextBox ID="txtUserName" runat="server" Width="150px" MaxLength="50" CssClass="txt adminControl"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="refvUserName" ControlToValidate="txtUserName" runat="server"
                        SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <%if (this.Command == CommonFunction.AddCommand)
              { %>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblPassword" runat="server" Text="Mật khẩu"></asp:Label>(<span class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:TextBox ID="txtPassword" runat="server" Width="150px" TextMode="Password" MaxLength="50"
                        onblur="this.className='detailedViewTextBox'" CssClass="txt adminControl"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="refvPassWord" ControlToValidate="txtPassword" runat="server"
                        SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="regvPassword" runat="server" SetFocusOnError="true"
                        ControlToValidate="txtPassword" ErrorMessage="RegularExpressionValidator" Display="Dynamic"
                        ValidationExpression="\w{4,8}">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblConfirmPassword" runat="server" Text="Xác nhận mật khẩu"></asp:Label>(<span
                        class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:TextBox ID="txtConfirmPass" runat="server" Width="150px" TextMode="Password"
                        MaxLength="50" CssClass="txt adminControl"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="refvConfirmPass" ControlToValidate="txtConfirmPass"
                        runat="server" SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="cpvConfirmpass" runat="server" SetFocusOnError="true" Display="Dynamic"
                        ErrorMessage="CompareValidator" ControlToValidate="txtConfirmPass" ControlToCompare="txtPassword">*</asp:CompareValidator>
                </td>
            </tr>
            <%} %>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblEmail" runat="server" Text="Email"></asp:Label>(<span class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:TextBox ID="txtEmail" runat="server" Width="150px" MaxLength="256" CssClass="txt adminControl"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="refvEmail" ControlToValidate="txtEmail" runat="server"
                        SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="regvEmail" runat="server" ErrorMessage="RegularExpressionValidator"
                        SetFocusOnError="true" Display="Dynamic" ControlToValidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblBirthDay" runat="server" Text="Ngày sinh"></asp:Label>(<span class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:TextBox ID="txtBirthDay" runat="server" Width="60px" MaxLength="10" CssClass="txt adminControl"></asp:TextBox>
                    <img id="imgBirthDay" alt="" title="Ngày sinh" style="cursor: hand; text-align: left;
                        vertical-align: middle; margin-bottom: 4px;" src="../images/imgCalendar.gif" />
                    <asp:CustomValidator runat="server" ID="cusvBirthDay" ControlToValidate="txtBirthDay"
                        ClientValidationFunction="CheckInputDate">*</asp:CustomValidator>
                    <asp:RequiredFieldValidator ID="refvBirthDay" Display="Dynamic" ControlToValidate="txtBirthDay"
                        runat="server" SetFocusOnError="true">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblGender" runat="server" Text="Giới tính"></asp:Label>(<span class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:DropDownList ID="drlGender" CssClass="drp adminControl" runat="server">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="refvGender" ControlToValidate="drlGender" runat="server"
                        SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblAddress" runat="server" Text="Địa chỉ"></asp:Label>(<span class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:TextBox ID="txtAddress" runat="server" Width="250px" MaxLength="256" CssClass="txt adminControl"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="refvAddress" ControlToValidate="txtAddress" runat="server"
                        SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblIsApproved" runat="server" Text="Kích hoạt tài khoản:"></asp:Label>
                </td>
                <td class="labelLeft">
                    <asp:CheckBox ID="chkIsApproved" runat="server" />
                </td>
            </tr>
            <tr>
                <td class="labelRight">
                    <asp:Label ID="lblRoles" runat="server" Text="Quyền"></asp:Label>(<span class="commentRequireInput">*</span>):
                </td>
                <td class="labelLeft">
                    <asp:CheckBoxList ID="chkRoles" Style="margin-left: -2px;" runat="server" RepeatColumns="3"
                        RepeatLayout="Table" RepeatDirection="Vertical">
                        <asp:ListItem Text="Guest"></asp:ListItem>
                        <asp:ListItem Text="Admin"></asp:ListItem>
                        <asp:ListItem Text="Supper Admin"></asp:ListItem>
                    </asp:CheckBoxList>
                </td>
            </tr>
            <tr>
                <td align="right">
                </td>
                <td align="left">
                    <asp:Button ID="btnSave" runat="server" Text="Lưu" CssClass="ui-state-default ui-corner-all ui-state-focus"
                        OnClick="btnSave_Click" />
                    <asp:Button ID="btnReset" runat="server" Text="Làm lại" CssClass="ui-state-default ui-corner-all ui-state-focus"/>
                    <asp:Button ID="btnCancel" runat="server" Text="Bỏ qua" CssClass="ui-state-default ui-corner-all ui-state-focus" />
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
